package com.shuwen.gcdj.common.util.serialize;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;

/**
 * 序列化工具
 */
@Slf4j
public class SerializeUtils {
    private SerializeUtils() {
    }

    public static String serialize(Object obj) {
        return JSON.toJSONString(obj);
    }

    public static JSONObject unSerialize(String str) {
        return JSON.parseObject(str);
    }
}
